import request from "../utils/request.js";
import {paginate} from "./role";

export function getPower(){
    return request({
        url :"/power/list",
        method :"get"
    })
}
export function getPowerAll(){
    return request({
        url :"/power/all",
        method :"get"
    })
}
export function createPower(params:any){
    return request({
        url :"/power/",
        method :"post",
        data:params
    })
}
export function deletePower(id:number){
    return request({
        url :`/power/${id}`,
        method :"delete"
    })
}
export function updateEnable(id:number){
    return request({
        url :`/power/enable/${id}`,
        method :"patch"
    })
}

export function getPowerShow(id:number){
    return request({
        url :`/power/${id}`,
        method :"get"
    })
}

export function updatePower(params:any,id:number){
    return request({
        url :`/power/${id}`,
        method :"patch",
        data:params
    })
}
